# -*- coding: utf-8 -*-
from django.db import models

class Event(models.Model):
	name = models.CharField('Имя события', max_length=50)
	code = models.CharField('Код', max_length=20)
	class Meta:
		verbose_name_plural = 'Событие' 
	def __unicode__(self):
		return self.name
        
class Advice(models.Model):
	event = models.ForeignKey(Event)
	sort = models.IntegerField('Порядок')
	title = models.CharField('Заголовок', max_length=200)
	content = models.TextField('Текст')
	class Meta:
		verbose_name_plural = 'Совет' 
	def __unicode__(self):
		return self.title
